package com.hz.userService.mapper;

import com.hz.userService.domain.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
* @author li
* @description 针对表【users(用户表)】的数据库操作Mapper
* @createDate 2023-09-23 17:13:32
* @Entity com.hz.userService.domain.User
*/
public interface UserMapper extends BaseMapper<User> {

    @Select("select * from users where user_type = 2 and id = #{id}")
    User selectTeacherById(@Param("id") Integer id);

    @Select("select * from users where user_type = 3 and id = #{id}")
    User selectStudentById(@Param("id") Integer id);
}




